<extend name="public:nobase" />
<block name="cont">
    <link rel="stylesheet" type="text/css"  href="__SKIN__/css/webuploader.css"/>
    <style>
        .form-group {
            float: left;
            width: 100%;
            margin-bottom: 12px;
        }
    </style>
    <div class="main-content" style="width: 550px;height:550px;">
        <div class="row">
            <form id="menuForm" action="">
                <input type="hidden" name="id" value="{$row['id']}">

                <div class="form-group" >
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> {:lang('activityname')} </label>

                    <div class="col-sm-9">
                        <input name="activityname" value="{$row['activityname']}" class="col-xs-10 col-sm-5" id="form-field-1" type="text" placeholder="">
                    </div>
                </div>
                <div class="form-group" >
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> {:lang('content')} </label>

                    <div class="col-sm-9">
                        <input name="content" value="{$row['content']}" class="col-xs-10 col-sm-5" id="form-field-1" type="text" placeholder="">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-4"> {:lang('activity_time')}</label>

                    <div class="col-sm-9">
                        <input name="activity_time" value="{$row['activity_time']}" class="col-xs-10 col-sm-5" id="form-field-4" type="text" placeholder="">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> {:lang('img')} </label>

                    <div class="col-sm-9">
                        <div class="input-group">
                            <input class="form-control col-xs-10 col-sm-5" value="{$row['img']}" id="_logo" name="img" type="text">
                            <span class="input-group-btn">
                                <button class="btn btn-sm btn-default" id="logoPicker" type="button">
                                    <i class="ace-icon fa fa-upload"></i> 上传
                                </button>
                            </span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-4"> {:lang('total')}</label>

                    <div class="col-sm-9">
                        <input name="total" value="{$row['total']}" class="col-xs-10 col-sm-5" id="form-field-4" type="text" placeholder="">
                    </div>
                </div>
                <div class="form-group" action="">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1">  </label>

                    <div class="col-sm-9">
                        <button class="btn btn-info submit-ajax" data-form="#menuForm" type="button">
                        <i class="ace-icon fa fa-check bigger-110"></i>
                        确认提交
                    </button>
                    </div>
                </div>

            </form>
        </div>
    </div>

</block>

<block name="footer">
<script src="__SKIN__/js/webuploader.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/backend/js/uploader.js" type="text/javascript"></script>

<script type="text/javascript">
//时间插件配置
var dateRangePickerConfig = {
    minDate: '2019/01/01 00:00:00',    //最小时间
    showDropdowns: true,    //选择年月
    dateLimit: {days: 300}, //起止时间的最大间隔
    applyClass : 'btn-sm btn-success',
    cancelClass : 'btn-sm btn-default',
    autoUpdateInput: true, //自动更改赋值
    defaultDate: new Date(),
    locale: {
        applyLabel: '确定',
        cancelLabel: '取消',
        fromLabel: '起始时间',
        toLabel: '结束时间',
        daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'],
        monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
        firstDay: 1,
        format: 'YYYY/MM/DD',
    }
}

//时间控件
$('input[name=activity_time]').daterangepicker(dateRangePickerConfig);
$('input[name=activity_time]').on('cancel.daterangepicker', function(ev, picker) {
    $('input[name=activity_time]').val('');
});

//webupload
$("#logoPicker").Uploader({server:"{:U('UpFiles/upload')}",'fileinput':"#_logo"});
</script>
</block>